package cn.da.shuai.cool.common.expection;

import lombok.Getter;
import lombok.Setter;

import java.io.Serial;

@Setter
@Getter
public class CoolServiceException extends RuntimeException {
    @Serial
    private static final long serialVersionUID = 1L;
    private Integer code;
    private String message;

    public CoolServiceException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public CoolServiceException(String message) {
        super(message);
        this.message = message;
        this.code = 500;
    }
}